Skip to content

Include non-Schedule-D capital gain distributions in gross income and net investment income#8839

Merged
MaxGhenis merged 4 commits into
PolicyEngine:mainfrom
MaxGhenis:fix/e01100-agi-inclusion
Jul 5, 2026
Merged

Include non-Schedule-D capital gain distributions in gross income and net investment income#8839
MaxGhenis merged 4 commits into
PolicyEngine:mainfrom
MaxGhenis:fix/e01100-agi-inclusion

Conversation

@MaxGhenis

@MaxGhenis MaxGhenis commented Jul 2, 2026

Copy link
Copy Markdown
Contributor

Summary

  • include non_sch_d_capital_gains (capital gain distributions reported without Schedule D, PUF E01100) in gross income, so they enter AGI
  • include them in net_capital_gain, so capital_gains_tax and the taxable-income exclusion tax them at preferential long-term rates (IRC 852(b)(3)(B)) rather than ordinary rates
  • include them in net investment income for NIIT
  • integration tests pin the AGI, ordinary-vs-preferential split (0% and 15% bracket cases), and NIIT outcomes

Fixes #8828

Revenue effect

Including the $13.69B of non-Schedule-D distributions raises 2026 federal income tax by $1.20B (8.8% dollar-weighted effective rate), consistent with preferential-rate treatment. An earlier revision that routed them only through gross income taxed them at ordinary rates and overstated this at $2.07B.

Tests

  • policyengine_us/tests/policy/baseline/gov/irs/integration/non_sch_d_capital_gains.yaml (6 cases including ordinary/preferential split pins)
  • policyengine_us/tests/policy/baseline/gov/irs/irs_gross_income.yaml
  • capital-gains suites pass locally (31 tests)

… NII

non_sch_d_capital_gains (capital gain distributions reported on Form 1040
line 7 without Schedule D, PUF E01100) was populated in the enhanced CPS
and referenced by the QDCGT worksheet (dwks09/dwks10), but never entered
gross income or net investment income, so it was never taxed.

Add it to gov.irs.gross_income.sources and gov.irs.investment.income.sources.
On the 2026 enhanced CPS this raises federal income tax by $2.07B (incl.
$0.10B NIIT) and state income tax by $0.42B via AGI conformity, across
4.0M tax units.

Fixes PolicyEngine#8828

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
MaxGhenis and others added 2 commits July 4, 2026 22:12
Adding the distributions only to gross income taxed them at ordinary
rates: capital_gains_tax and the taxable-income exclusion key off
net_capital_gain, which did not include them, while the dwks worksheet
that did feeds only the AMT comparison. Include them in
net_capital_gain (long-term by IRC 852(b)(3)(B), no Schedule D netting
on the line 7 path), pin ordinary-vs-preferential splits in the
integration tests, and restate the 2026 revenue effect at $1.20B
(8.8% effective rate on the $13.69B base), down from the $2.07B
ordinary-rate figure.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
@codecov

codecov Bot commented Jul 5, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 100.00%. Comparing base (f9e58e7) to head (78ce0ca).
⚠️ Report is 69 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff            @@
##              main     #8839   +/-   ##
=========================================
  Coverage   100.00%   100.00%           
=========================================
  Files            3         1    -2     
  Lines           55        17   -38     
=========================================
- Hits            55        17   -38     
Flag Coverage Δ
unittests 100.00% <100.00%> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@MaxGhenis MaxGhenis merged commit 4916420 into PolicyEngine:main Jul 5, 2026
29 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

non_sch_d_capital_gains (capital gain distributions, PUF E01100) never enters AGI — $13.7B untaxed, ~$1.2B/yr federal

1 participant